//
//  afMenu.h
//  AccuroFit
//
//  Created by NCIT Developer on 3/9/16.
//  Copyright © 2016 Nci Technology Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "afMenuItem.h"

typedef void(^AfMenuSelectedItem)(NSInteger index, afMenuItem *item);

typedef enum {
  AfMenuBackgrounColorEffectSolid      = 0, //!<背景显示效果.纯色
  AfMenuBackgrounColorEffectGradient   = 1, //!<背景显示效果.渐变叠加
} AfMenuBackgrounColorEffect;

@interface afMenu : NSObject

+ (void)showMenuInView:(UIView *)view fromRect:(CGRect)rect menuItems:(NSArray *)menuItems selected:(AfMenuSelectedItem)selectedItem;

+ (void)dismissMenu;
+ (BOOL)isShow;

// 主题色
+ (UIColor *)tintColor;
+ (void)setTintColor:(UIColor *)tintColor;

// 标题字体
+ (UIFont *)titleFont;
+ (void)setTitleFont:(UIFont *)titleFont;

// 背景效果
+ (AfMenuBackgrounColorEffect)backgrounColorEffect;
+ (void)setBackgrounColorEffect:(AfMenuBackgrounColorEffect)effect;

// 是否显示阴影
+ (BOOL)hasShadow;
+ (void)setHasShadow:(BOOL)flag;

@end
